//
//  TelNumberViewController.m
//  DaiShengInvest
//
//  Created by davinci on 17/6/8.
//  Copyright © 2017年 davinci. All rights reserved.
//

#import "TelNumberViewController.h"
#import "MessageVerifyViewController.h"

@interface TelNumberViewController ()


@property (nonatomic, weak)UITextField * telNumberText;

@property (nonatomic, weak)UIButton * sentMessageButton;

@end

@implementation TelNumberViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"注册";
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    
    UITextField * telNumberText = [[UITextField alloc] init];
    
    telNumberText.borderStyle = UITextBorderStyleRoundedRect;
    telNumberText.placeholder = @"请输入账号";
    
    self.telNumberText = telNumberText;
    
    [self.view addSubview:self.telNumberText];
    
    
    [self.telNumberText mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view).offset(100 * SCREENH6);
        make.centerX.mas_equalTo(self.view);
        make.width.mas_equalTo(250 * SCREENH6);
        make.height.mas_equalTo(30 * SCREENH6);
    }];
    
    
    
    UIButton * sentMessageButton = [[UIButton alloc] init];
    
    [sentMessageButton setTitle:@"发送验证码" forState:UIControlStateNormal];
    sentMessageButton.titleLabel.font = [UIFont systemFontOfSize:14];
    [sentMessageButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [sentMessageButton setBackgroundColor:[UIColor whiteColor]];    
    sentMessageButton.layer.borderColor = [[UIColor blackColor] CGColor];
    //边框宽度
    sentMessageButton.layer.borderWidth =1.0f;
    //处理圆角
    sentMessageButton.layer.cornerRadius =10.0f;
    [sentMessageButton addTarget:self action:@selector(didSentMessageButton) forControlEvents:UIControlEventTouchUpInside];
    
    self.sentMessageButton = sentMessageButton;
    
    [self.view addSubview:self.sentMessageButton];
    
    
    [self.sentMessageButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.view);
        make.top.mas_equalTo(self.telNumberText.mas_bottom).offset(30 * SCREENH6);
        make.width.mas_equalTo(250 * SCREENH6);
        make.height.mas_equalTo(30 * SCREENH6);
    }];
}


//- (void)didSentMessageButton{
//    
//    MessageVerifyViewController * messageVC = [[MessageVerifyViewController alloc] init];
//    
//    [self.navigationController pushViewController:messageVC animated:YES];
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
